package com.ng.stat.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ng.common.utils.PageUtils;
import com.ng.common.utils.Query;
import com.ng.stat.dao.BookWxDao;
import com.ng.stat.dao.SearchDao;
import com.ng.stat.entity.BookEntity;
import com.ng.stat.entity.BookWX;
import com.ng.stat.service.BookWxService;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author cb
 * @Description TODO
 * @date 2023/8/18
 */
@Service
public class BookWxServiceImpl extends ServiceImpl <BookWxDao, BookWX> implements BookWxService {
    @Override
    public PageUtils findListPage(BookWX entity, PageUtils page) {

        String bookname = entity.getBookname();


        QueryWrapper<BookWX> queryWrapper=new QueryWrapper<BookWX>();


        //  queryWrapper.like("classcode",1);

        queryWrapper.like(StringUtils.isNotBlank(bookname),"bookname", bookname);
        IPage<BookWX> ipage = this.page(new Query<BookWX>(page).getPage(),queryWrapper);
        return new PageUtils(ipage);



    }
}
